<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href = "../css/bootstrap.min.css">
    <script type="application/javascript" src="../js/jquery-1.9.0.min.js"></script>
    <script type="application/javascript" src="../js/bootstrap.min.js"></script>
    <title>Title</title>
    <script>
        $(function (){
            alert("Hello,jQuery!");
        })
    </script>
</head>
<body>
<input type="text">
<p></p>
<button id="btn">单次调用</button>
<script>
    // $("input").on("click",function (){
    //     $("p").text("input被按了一下");
    // })
    // ;$("input").on("click change",function (){
    //     $("p").text("input被按了一下或变更");
    // });
    $("input").on({
        "click" :function (){$("p").text("input被按了一下")},
        "change" : function (){$("p").text("input变更");}
    });

    var f1 = function (){
        alert("初次点击!")
    }
    $("#btn").on("click",f1);
    // $("#btn").off("click",f1);
</script>
</body>
</html>